package com.len.controller;

import com.len.base.BaseController;
import com.len.entity.SpCopyGoods;
import com.len.service.SpCopyGoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("copyGoods")
public class SpCopyGoodsController extends BaseController<SpCopyGoods> {
    @Autowired
    private SpCopyGoodsService spCopyGoodsService;
    @RequestMapping("/show")
    public String show(SpCopyGoods spCopyGoods){
        try {
            spCopyGoodsService.selectByPrimaryKey(spCopyGoods);
        }catch (Exception e){
            e.printStackTrace();
        }
        return null;
    }
    @RequestMapping("/save")
    public String save(SpCopyGoods spCopyGoods){
        try {
            spCopyGoodsService.insert(spCopyGoods);
        }catch (Exception e){
            e.printStackTrace();
        }
        return null;
    }
    @RequestMapping("/update")
    public String update(SpCopyGoods spCopyGoods){
        try {
            spCopyGoodsService.updateByPrimaryKey(spCopyGoods);
        }catch (Exception e){
            e.printStackTrace();
        }
        return null;
    }
}
